From 411d5924a8ff01b45101ba178ab7e7021a987b7b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 28 May 1993 22:08:53 +0000 Subject: [PATCH] (find-log-file): Use source file's truename dir. --- lisp/add-log.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/add-log.el b/lisp/add-log.el index 2c9170903d1..9b180566f70 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -54,6 +54,13 @@ Once a file is found, `change-log-default-name' is set locally in the current buffer to the complete file name." (or file-name (setq file-name (or change-log-default-name + ;; Chase links in the source file + ;; and use the change log in the dir where it points. + (and buffer-file-name + (let (temp (file buffer-file-name)) + (while (setq temp (file-symlink-p file)) + (setq file temp)) + (file-name-directory file))) default-directory))) (if (and (eq file-name change-log-default-name) (assq 'change-log-default-name (buffer-local-variables))) -- 2.30.2